#include <QCoreApplication>
#include <vector>
#include <iostream>

using namespace std;

void pr_4_21()
{
    vector<int> iV = {0,1,2,3,4,5,6,7,8,9,10};

    for (auto it = iV.begin(); it != iV.end(); ++it) {
        (*it % 2 == 0) ? (*it) : (*it = *it * 2);
        cout << *it << " ";
    }
    cout << endl;
}

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    pr_4_21();

    return a.exec();
}
